EP 1 786 303 discloses an apparatus for preparing a beverage which comprises a detection device for recognising an identification marking on a portion package. The detection device is arranged on a sliding rail for guiding the portion package and carries out a colour recognition in that reflected light of a diode is detected. Such detection is susceptible to errors, especially when the package is soiled on the exterior side or the colours on the packages reflect light in a similar frequency spectrum.
WO 2007/087890 discloses a further apparatus for preparing hot beverages, in which a detection unit is provided for reading out a code provided on the cartridges. The detection unit comprises a radiation emitter and a radiation detector, wherein the radiation is guided through the edge of a cartridge. Means for coding are provided on the edge, so that recognition of the cartridge can occur. It is also disadvantageous in this recognition system that the edge of the cartridge is gripped during use for insertion of the cartridge and can therefore be soiled very easily. This can lead to errors in the recognition. Furthermore, the cartridge edge can also be slightly deformed or damaged.